import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'new-table',
  templateUrl: './new-table.component.html',
  styleUrls: ['./new-table.component.scss']
})
export class NewTableComponent implements OnInit {

  dataSet = [];
  constructor() { }

  ngOnInit() {
    for (let i = 1; i <= 100; i++) {
      this.dataSet.push({
        name: `EBCoin${i}`,
        sname: `EBC${i}`,
        marketValue: Math.random() * 1000,
        price: Math.random() * 1,
        amount: Math.random() * 1719,
        deal: Math.random() * 5000,
        updown: i % 2 ? 0 - Math.random() / 10 : Math.random() / 10,
        color: i % 2 ? false : true,
        publicTime: `${i}天前`
      });
    }
  }

}
